/*
 * MineralActivity.h
 *
 *  Created on: 20 Aug 2011
 *      Author: Allan
 */

#ifndef MINERALACTIVITY_H_
#define MINERALACTIVITY_H_

// C++ includes
#include <string>
#include <vector>
using namespace std;

// GeoReact includes
#include <Core/Activity.h>
#include <Utils/Types.h>

class MineralActivity : public Activity
{
public:
	MineralActivity();
	
	MineralActivity(const string& species, const vector<string>& phase_species, const ActivityCoefficientFunction& activity_coefficient);
	
	virtual ~MineralActivity();

	virtual const double activity(double T, double P, const VectorXd& n) const;
	
	virtual const double activityCoefficient(double T, double P, const VectorXd& n) const;
	
	virtual const VectorXd activityDerivatives(double T, double P, const VectorXd& n, const VectorXd& a) const;
	
protected:
	/// The index of the species in the mineral solution for which the activity is being defined
	Index index_species;
	
	/// The activity coefficient function
	ActivityCoefficientFunction activity_coefficient;
};

const MineralActivity MineralActivityIdealModel(const string& species, const vector<string>& phase_species);

#endif /* MINERALACTIVITY_H_ */
